package com.txzt.gaea.common.enums;

public enum MaintainType {


    /**
     * 设备维修
     */
    REPAIR("repair","设备维修"),
    /**
     * 设备报废
     */
    SCRAP("scrap","设备报废"),
    ;

    private final String code;

    private final String info;

    MaintainType(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static String getInfoByCode(String code){
        MaintainType[] statuses = values();
        for (MaintainType status:statuses){
            if (status.getCode().equals(code)) {
                return status.getInfo();
            }
        }
        return "";
    }
}
